/**
 * 版权所有 (C), 2019-2019, XXX有限公司
 * 项目名：com.company.study.designpatterns.observer
 * 文件名: Test
 * 日期: 2019/6/16 13:58
 * 说明:
 */
package com.company.study.designpatterns.observer;

/**
 * @author Anbang713
 * @create 2019/6/16
 */
public class Test {
    public static void main(String[] args) {
        UserInfo userInfo = new UserInfo("麻辣香锅", "malaxiangguo");

        SmsObserver smsObserver = new SmsObserver();
        EmailObserver emailObserver = new EmailObserver();

        userInfo.addObserver(smsObserver);
        userInfo.addObserver(emailObserver);

        userInfo.updatePassword("mlxg");
    }
}